﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZHDJ.Core;
using ZHDJ.Data.DataCaching;
using ZHDJ.Data.Models.Common;
using ZHDJ.WebPage;

namespace ZHDJ.Web.Portal.Grassroots
{
    public partial class DocumentDetail : PortalPage
    {
        #region 页面属性
        public string ArticleID
        {
            get
            {
                return this.Request["id"];
            }
        }

        public string CategoryName { get; set; }
        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {
            PartyArticle article = DB.PartyArticles.Find(ArticleID);
            this.lblTitle.Text = article.Title;
            this.lblTime.Text = "日期：" + Convert.ToDateTime(article.CreateTime).ToString("yyyy-MM-dd");
            this.lbBranch.Text = "发布：" + SystemParameterCaching.Get(SystemParameterKey.WebArticleHostName);
            this.ltContent.Text = article.Content;
            CategoryName = (article.Category == "GrassrootsWorkPoint" )? "工作文件指引" : "督导情况通报";
        }
    }
}